fsCommBusCall
The fsCommBusCall function is used to call an event registered in a WASM or JS module..
Syntax
bool fsCommBusCall(
const char* eventName,
const char* buf,
unsigned int bufSize,
FsCommBusBroadcastFlags broadcastTo = FsCommBusBroadcast_Default
);
Members
| Parameters | Description |
|---|---|
eventName |
The name of the event to call. |
buf |
A buffer that will be sent with the callback. |
bufSize |
Size of the buffer that is being sent with the callback. |
broadcastTo |
The flags that determined which module (JS/WASM) the event is to be broadcast to. You can find more details here: The default value is |
Return Values
The function returns False if something has gone wrong, otherwise it returns True.
Remarks
This function will post a message on a bus which will call registered functions. This part will be delayed and is not synchronous with the WASM module. This is why you cannot have a return value to know if a message has been delivered to someone, only a return to know if there has been some internal error (eg: buf = nullptr and size != 0 for instance).
See Also